package GreatBattleOfAircraft.obj;

import java.awt.*;

public class BoomObj extends GameObj {

    static Image[] pics = new Image[7];

    int boomCount = 0;

    static {
        for (int i = 0; i<pics.length;i++){
            pics[i] = Toolkit.getDefaultToolkit().getImage("./images/GreatBattleOfAircraft/boom/boom_0"+(i+1)+".png");
        }
    }
    public BoomObj(int x, int y) {
        super(x, y);
    }

    public BoomObj(int x, int y, int width, int height) {
        super(x, y, width, height);
    }

    @Override
    public void painSelf(Graphics graphics) {
        if (boomCount<7){
            img = pics[boomCount];
            super.painSelf(graphics);
            boomCount++;
        }
    }
}
